<?php
include_once('conn.php');
if(!isset($_POST['submit'])){
    die("非法访问！");
}
$stu_name=$_POST['stu_name'];// 姓名
$stu_score=$_POST['stu_score'];// 分数
$sql = "insert into `student_info` (stu_name,stu_score)
 values ('$stu_name',$stu_score)";
$ret = mysqli_query($conn,$sql);
if($ret){
    echo "添加成功！<a href='./index.php'>返回首页</a>";
}else{
    echo "添加失败！";
}